package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.toolbox.util.DateUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @description:
 * @Author: hongxiao
 * @date: 2019-01-12 17:07
 */
@Getter
@Setter
@ToString
public class SmsStatusEntity extends Entity {
    public static String [] sendApiArray={"创蓝营销帐号","创蓝通知帐号"};

    private static final long serialVersionUID = -1L;
    public SmsStatusEntity (){
        long now = DateUtil.getInt();
        this.updateTime = now;
        this.addTime = now;
        this.del = 0;
    }

    public SmsStatusEntity(String corpid, String sender, String receiver, String mobile, String userId, Integer type,
                           String content, Integer status, Integer sendApi) {
        this.corpid = corpid;
        this.sender = sender;
        this.receiver = receiver;
        this.mobile = mobile;
        this.userId = userId;
        this.type = type;
        this.content = content;
        this.status = status;
        this.sendApi = sendApi;
        long now = DateUtil.getInt();
        this.updateTime = now;
        this.addTime = now;
        this.del = 0;
    }

    //========== properties ==========

    /**
     * 短信状态id
     */
    private Long id;
    /**
     * 短信发送人corpid
     */
    private String corpid;
    /**
     * 短信发送人姓名
     */
    private String sender;
    /**
     * 接收人
     */
    private String receiver;
    /**
     * 手机号(单个) 空间畅想服务商可以有多个，多个手机号码使用英文逗号分隔
     */
    private String mobile;
    /**
     * 短信发送人userId
     */
    private String userId;
    /**
     * 类型，0即时发送，1定时发送
     */
    private Integer type;
    /**
     * 短信内容
     */
    private String content;
    /**
     * 发送时间
     */
    private Long sendTime;
    /**
     * 短信编号
     */
    private String msgId;
    /**
     * 短信状态 0未发送，1已发送，2已失败
     */
    private Integer status;
    /**
     * 短信状态码（参见创蓝文档）
     */
    private String statusCode;
    /**
     * 状态解释
     */
    private String statusMemo;
    /**
     * 短信状态获得时间
     */
    private Long statusTime;
    /**
     * 对象id
     */
    private Long refId;
    /**
     * 对象类型，参考XbbRefTypeEnum
     */
    private Integer refType;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * 表单id
     */
    private Long formId;
    /**
     * 数据来源
     */
    private Integer saasMark;
    /**
     * 字段标识
     */
    private String attr;

    private Long addTime;

    private Long updateTime;

    private Integer del;
    /**
     * 0创蓝营销帐号，1创蓝通知帐号
     */
    private Integer sendApi=0;
}
